package com.bandit;

import com.bandit.config.RpcServiceConfig;
import com.bandit.remoting.transport.netty.server.RpcNettyServer;
import com.bandit.service.UserServiceImpl;

/**
 * @author Bandit
 * @create 2022/2/27 18:49
 */
public class NettyServerMain {
    public static void main(String[] args) {
        UserServiceImpl userService = new UserServiceImpl();
        RpcServiceConfig rpcServiceConfig = new RpcServiceConfig();
        rpcServiceConfig.setService(userService);
        rpcServiceConfig.setVersion("1.0");
        RpcNettyServer server = new RpcNettyServer();
        server.registerService(rpcServiceConfig);
        server.start();
    }
}
